package com.mxz.feign.controller;

import com.mxz.common.core.domain.R;
import com.mxz.common.core.web.controller.BaseController;
import com.mxz.common.security.annotation.InnerAuth;
import com.mxz.common.api.domain.SysOperLog;
import com.mxz.system.service.SysOperLogService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(tags = "[公用]【feign】管理员日志相关接口")
@RestController
@RequestMapping("/feign/sys")
public class SysLogFeignController extends BaseController {

    @Autowired
    private SysOperLogService operLogService;

    /**
     * 用户操作日志
     *
     * @param operLog
     * @return
     */
    @InnerAuth
    @ApiOperation("新增管理员操作日志")
    @PostMapping("/operLog")
    public R<Boolean> addOperLog(@RequestBody SysOperLog operLog) {
        return R.ok(operLogService.insertOperlog(operLog) > 0);
    }

}
